<?php
// .-----------------------------------------------------------------------------------
// | WE TRY THE BEST WAY 杭州博也网络科技有限公司
// |-----------------------------------------------------------------------------------
// | Author: 贝贝 <hebiduhebi@163.com>
// | Copyright (c) 2013-2016, http://www.itboye.com. All Rights Reserved.
// |-----------------------------------------------------------------------------------

namespace Shop\Model;
use Think\Model;

class ProductModel extends Model{
	
	/**
	 * 上架
	 */
	const STATUS_ONSHELF = 1;
	
	/**
	 * 下架
	 */
	const STATUS_OFFSHELF = 0;


	/**
	 * 综合排序
	 */
	const SORT_COMPREHENSIVE = 10;

	/**
	 * 销量排序
	 */
	const SORT_SALE = 11;

	/**
	 * 价格从低到高
	 */
	const SORT_PRICE_ASC = 12;

	/**
	 * 价格从高到低
	 */
	const SORT_PRICE_DESC = 13;

	/**
	 * 开始时间从早到晚
	 */
	const SORT_START_TIME_ASC = 14;

	/**
	 * 开始时间从晚到早
	 */
	const SORT_START_TIME_DESC = 15;

	/**
	 * 结束时间从早到晚
	 */
	const SORT_END_TIME_ASC = 16;

	/**
	 * 结束时间从晚到早
	 */
	const SORT_END_TIME_DESC = 17;
	
	protected $_auto = array(
		array('updatetime', 'time', self::MODEL_BOTH,'function'), 
		array('createtime', NOW_TIME, self::MODEL_INSERT), 
		array('status', 1, self::MODEL_INSERT), 
		
	);
	
	
}

